#pragma once
#include "AbstractObject.h"
#include <Ogre.h>

class PathNode; //Forward declare for Edge to see
struct Edge
{
	PathNode* pNode;
	int moveCost;
	int exposure;
};

class PathNode : public AbstractObject
{
public:
	PathNode(void);
	PathNode(const std::string& name, Ogre::Vector3 pos, Ogre::SceneManager* pSceneMgr);
	~PathNode(void);

	const std::string& getName(void);
	PathNode* getParent(void);
	std::vector<Edge*>* getEdges(void);
	float getGCost(void);
	float getFCost(void);
	bool getClosed(void);

	void setParent(PathNode* pParent);
	void setClosed(bool closed);
	void setGCost(float cost);

	void calcHCost(PathNode* pGoal);
	void calcFCost(void);

	void createEdge(PathNode* pNode);
	void reset(void);
private:
	std::string mName;
	std::vector<Edge*> mEdges;
	PathNode* mpParent;

	float mFCost;
	float mGCost;
	float mHCost;

	bool mClosed;
};